<include file="Public:header" />
<script type="text/javascript" src="__PUBLIC__/Admin/Js/jquery.min.js"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/Js/artDiag4.13/jquery.artDialog.js?skin=blue"></script>
<script type="text/javascript" src="__PUBLIC__/Admin/Js/artDialog.confirm.js"></script>
<script>
    function del(url){
        alert(id);
        artGetConfirm({
            content: '确定要删除此数据吗？',
            submitUrl: url
        });
    }
</script>
<p class="line" style="margin-top:0;"></p>
<div class="title_h2">搜索</div>
<form action="{:U('Article/index')}" method="get" id="searchform">
    <input type="hidden" name="title_like" value="1" />
    <input type="hidden" name="_order" id="_order" value="{$order}" />
    <input type="hidden" name="_sort" id="_sort" value="{$sort}" />
    <div class="filed fl">
        <select name="catid">
            <option value="">分类</option>
            <volist name="CATEGORY" id="vo">
                <option value="{$vo.id}" <eq name="Think.get.catid" value="$vo.id"> selected=selected</eq>>{$vo.catname}</option>
            </volist>
        </select>
        {$Think.get.fromtime|show_date='fromtime',###,0,0,'false'}- &nbsp;{$Think.get.totime|show_date='totime',###,0,0,'false'}
        <select name="fieldskey">
            <option value="title" <eq name="Think.get.fieldskey" value="title"> selected=selected</eq>>标题</option>
            <option value="uid" <eq name="Think.get.fieldskey" value="uid"> selected=selected</eq>>会员ID</option>
        </select>
        <input type="text" name="fieldsvalue" value="{$Think.get.fieldsvalue}"/>
    </div>
    <div class="filed fl">
        <input type="submit" name="dosubmit" class="button" value="" />
    </div>
</form>
<div class="tablelist">
    <form action="{:U('Article/refresh')}" method="post">
        <table class="table">
            <tr>
                <th colspan="12" class="top_th">
                    <a class="add" href="{:U('Article/add')}">添加{$modulename}</a>
                </th>
            </tr>
            <tr>
                <th width="20"><input type="checkbox" id="check_box" onclick="selectall('id[]');"/></th>
                <th width="60">分类</th>
                <th>标题</th>
                <th>标签</th>
                <th width="50">会员ID</th>
                <th width="120">{:getSort('更新时间', 'edittime', $order, $sortImg)}</th>
                <th width="80">发布时间</th>
                <th width="40">状态</th>
                <th>管理操作</th>
            </tr>
            <tbody>
            <volist name="list" id="vo">
                <tr>
                    <td><input type="checkbox" name="id[]" value="{$vo['id']}"></td>
                    <td><a href="{:U('Article/index?catid='.$vo['catid'])}">{$CATEGORY[$vo['catid']]['catname']}</a></td>
                    <td>{$vo.title}&nbsp;{:getToppic($vo['topstatus'],$vo['toptotime'],$vo['topnum'])}</td>
                    <td>{$vo.tags}</td>
                    <td><a href="{:U('Article/index?fieldskey=uid&fieldsvalue='.$vo['uid'])}">{$vo['uid']}</a></td>
                    <td><eq name="vo['edittime']" value="0"> -- <else/>{$vo.edittime|date="Y-m-d",###}</eq></td>
                    <td><eq name="vo['expired']" value="0">永久有效<else />{$vo.addtime|date="Y-m-d",###}</eq></td>
                <td>{:getStatus($vo['status'], true, $vo['id'], 'status', array('未审核','正常'))}</td>
                <td>
                    <a href="{:U('Article/topbuy?id='.$vo['id'])}" title="信息置顶">{:getIcon('set','信息置顶')}</a>
                    <a href="{:U('Article/edit?id='.$vo['id'])}" title="编辑信息">{:getIcon('edit','编辑信息')}</a>
                    <a href="{:U('Article/delete?id='.$vo['id'])}" onclick="return confirm('你确定要删除此信息吗？')" title="删除信息">{:getIcon('del','删除信息')}</a>
                </td>
                </tr>
            </volist>
            <tr>
                <td colspan="12">
                    <input type="submit" id="dosubmit" class="button" name="dosubmit" value=" 刷新信息 " title="刷新时间为最新"/>
                    <input type="submit" id="dosubmit" class="button" name="dosubmit" value=" 删除信息 " onclick="if(!confirm('你确定要删除选中信息吗？')){return false;}this.form.action='{:U('Article/delete')}';"/>
                    <input type="submit" id="dosubmit" class="button" name="dosubmit" value=" 移动分类 " onclick="if($('#mcatid').val()==0){alert('请选择分类');$('#mcatid').focus();return false;}this.form.action='{:U('Article/move')}';"/>
                    <select name="mcatid" id="mcatid">
                        <option value="0">信息分类</option>
                        <volist name="CATEGORY" id="vo">
                            <option value="{$vo.id}">{$vo.catname}</option>
                        </volist>
                    </select>
                </td>
            </tr>
            </tbody>
        </table>
    </form>
    <div id="pages">{$page}</div>
</div>
<include file="Public:footer" />